import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { registerMicroApps, start } from 'qiankun'

const app = createApp(App)

// 注册微应用
registerMicroApps([
  {
    name: 'vue2-sub-app',
    entry: '//localhost:8081',
    container: '#vue2-container',
    activeRule: '/mainvue2'
  },
  {
    name: 'vue3-sub-app',
    entry: '//localhost:8082',
    container: '#vue3-container',
    activeRule: '/mainvue3'
  }
])

// 启动qiankun
start()

app.use(router)
app.use(ElementPlus)
app.mount('#app') 